#include <stdio.h>
int main()
{
    //标准输入流
    char name[10];
    printf("请输入名字：\n");
    fgets(name, 9, stdin);
    printf("name=%s\n", name);

    //从文件流读取数据
    FILE *pFile = fopen("/Users/springsongs/Documents/result.text", "r");
    char content[20];
    fgets(content, 20, pFile);
    printf("content=%s\n", content);
    fclose(pFile);
    return 0;
}